package com.testmanager.testmananger.zyyc.interTest.mapper;

import com.testmanager.testmananger.zyyc.interTest.domain.CaseEntity;
import com.testmanager.testmananger.zyyc.interTest.dto.CaseDto;

/**
 * @description:
 * @author: 何森存
 * @time: 2021/7/22 下午3:49
 */
public class CaseMapper {


    /**
     * dto:  private long id;
     *
     *     private long no;
     *
     *     private long projectNo;
     *     private String caseName;
     *     private String caseDescripe;
     *     private String methodName;
     *     private String preMethodName;
     *     private String author;
     * @param entity
     * @return
     */
    public static CaseDto toCaseDto(CaseEntity entity){

        return new CaseDto()
                .setId(entity.getId())
                .setNo(entity.getNo())
                .setProjectNo(entity.getProjectNo())
                .setCaseName(entity.getCaseName())
                .setCaseDescripe(entity.getCaseDescripe())
                .setMethodName(entity.getMethodName())
                .setPreMethodName(entity.getPreMethodName())
                .setAuthor(entity.getAuthor())
                ;
    }

    /**
     *  private long id;
     *
     *     private long no;
     *     private long  projectNo;
     *
     *     private String caseName;
     *     private String caseDescripe;
     *     private String methodName;
     *     private String preMethodName;
     *     private String author;
     * @param dto
     * @return
     */
//    public static CaseEntity toCaseEntity(CaseDto dto){
//        return new CaseEntity()
//                .setId(dto.getId())
//                .setAuthor(dto.getAuthor())
//                .set
//    }

}
